package com.yc.yn.model;

import com.alibaba.fastjson.annotation.JSONField;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "t_s_friends_request")
@org.hibernate.annotations.Table(appliesTo = "t_s_friends_request", comment = "好友请求表")
public class TSFriRequest extends IdEntity implements Serializable {

	private String sendUserId;

	private String acceptUserId;

	private Date requestDateTime;

	@Column(columnDefinition = "varchar(32) NOT NULL COMMENT '发送者id'")
	public String getSendUserId() {
		return sendUserId;
	}

	public void setSendUserId(String sendUserId) {
		this.sendUserId = sendUserId;
	}

	@Column(columnDefinition = "varchar(32) NOT NULL COMMENT '接收者id'")
	public String getAcceptUserId() {
		return acceptUserId;
	}

	public void setAcceptUserId(String acceptUserId) {
		this.acceptUserId = acceptUserId;
	}

	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Temporal(TemporalType.TIMESTAMP)
	@JSONField(format = "yyyy-MM-dd HH:mm:ss")
	@Column(columnDefinition = "datetime NOT NULL COMMENT '发送请求的时间'")
	public Date getRequestDateTime() {
		return requestDateTime;
	}

	public void setRequestDateTime(Date requestDateTime) {
		this.requestDateTime = requestDateTime;
	}
}